草庐IT

git 错误 : failed to push some refs to remote

全部标签

ruby-on-rails - PG::TRDeadlockDetected:错误:检测到死锁

我正在通过bundleexecpumactl-Fconfig/puma.rbphased-restart重新启动8个pumaworker,效果很好。现在我收到越来越多的postgres错误:PG::TRDeadlockDetected:ERROR:deadlockdetected我发现大约有50个空闲的postgres进程在运行:postgres:myappmyapp_production127.0.0.1(59950)idlepostgres:myappmyapp_production127.0.0.1(60141)idle...当我运行bundleexecpumactl-Fconf

ruby-on-rails - 无效的 gemspec - 格式错误的要求 ["#<YAML::Syck::DefaultKey:0xb5f9c990> 3.2.0"]

Invalidgemspecin[/usr/lib/ruby/gems/1.8/specifications/activemodel-3.2.0.gemspec]:Illformedrequirement["#3.2.0"]从尝试为其他问题进行sudogem更新当sudogemupdate遍历每个gem并为大多数gem获取消息时,获得数百次 最佳答案 升级到Rails3.2时可能会发生这种情况。更新Rubygems应该可以解决这个问题。gemupdate--system希望这对您有所帮助。

ruby-on-rails - 我该如何解决这个烦人的 syntastic rails 错误

我在rails中有以下代码SyntasticCheckVIM插件一直显示这个错误app/views/posts/new.html.erb[Syntax:line:12(1)]1app/views/posts/new.html.erb|12warning|possiblyuselessuseofavariableinvoidcontext 最佳答案 如果您只想不再看到这些消息:letg:syntastic_eruby_ruby_quiet_messages=\{'regex':'possiblyuselessuseofavariabl

ruby - Jekyll - 运行错误 'Jekyll Serve'

编辑:找到答案(见下面我的答案!)。它涉及使用版本1.4.2而不是1.4.3,因此如果有人对让1.4.3工作有任何想法,那也可能会有所帮助。谢谢!编辑2:感谢下面的评论,看来1.4.3在Windows上运行时确实有问题。https://github.com/jekyll/jekyll/issues/1948我刚刚在我的Windows7计算机上安装了jekyll。我安装了ruby​​和开发包。我已经运行了geminstalljekyll并成功完成。我根据jekyll文档创建了一个新站点。我遇到的问题发生在我尝试运行jekyllserve时。请在下面找到错误输出。PSC:\jekyll\t

ruby-on-rails - JSON 编码错误转义(Rails 3、Ruby 1.9.2)

在我的Controller中,以下工作(打印“oké”)putsobj.inspect但这不会(呈现“ok\u00e9”)render:json=>obj显然to_json方法转义了unicode字符。有没有办法阻止这种情况? 最佳答案 将\uXXXX代码设置回utf-8:json_string.gsub!(/\\u([0-9a-z]{4})/){|s|[$1.to_i(16)].pack("U")} 关于ruby-on-rails-JSON编码错误转义(Rails3、Ruby1.9.2

ruby - OpenSSL、RVM、Brew、冲突错误

当我在终端中运行brewdoctor时:我收到以下错误:Warning:Somekeg-onlyformulaarelinkedintotheCellar.Youmaywishto`brewunlink`thesebrews:openssl如果我取消链接,然后输入rvmrequirements:我将收到以下错误。Checkingrequirementsforosx.dyld:Librarynotloaded:@@HOMEBREW_CELLAR@@/openssl/1.0.1f/lib/libssl.1.0.0.dylibReferencedfrom:/usr/local/opt/ope

ruby-on-rails - 如何使用 Rails 2.1 中的 ExceptionNotifier 插件修复 'Unprocessed view path found' 错误?

将Rails1.2网站升级到2.1后,ExceptionNotifierplugin不再有效,提示这个错误:ActionView::TemplateFinder::InvalidViewPath:Unprocessedviewpathfound:"/path/to/appname/vendor/plugins/exception_notification/lib/../views".Setyourviewpathswith#append_view_path,#prepend_view_path,or#view_paths=.是什么原因造成的,我该如何解决?

ruby - 为什么我的 BigDecimal 对象初始化时出现意外舍入错误?

在Ruby2.2.0中,为什么:BigDecimal.new(34.13985572755337,9)等于34.0但是BigDecimal.new(34.13985572755338,9)等于34.1398557?请注意,我在64位机器上运行它。 最佳答案 用字符串而不是float初始化一般来说,您无法通过float获得可靠的行为。您错误地使用Float值而不是String值初始化BigDecimals,这在一开始就引入了一些不精确性。例如,在我的64位系统上:float1=34.13985572755337float2=34.13

ruby - 我怎样才能通过 "http://gems.rubyforge.org/does not appear to be a repository"错误消息

问题828421提出了类似的问题,但只收到一个真正的答案(更新ruby​​gems)并且该尝试导致相同的错误。Windows上的Ruby版本1.9.1.p243。包括Gem,版本1.3.5。以前从未安装过任何gem;从来没有为这个Ruby做过任何特殊的配置。Ruby本身可以工作,irb也可以,“gem”可以运行但不能安装(可能还有其他操作)。试过这个(来自一本书):geminstallrspec明白了:ERROR:http://gems.rubyforge.org/doesnotappeartobearepositoryERROR:Whileexecutinggem...(Gem::R

ruby - 在 Ruby 上获取 OpenSSL::X509::CertificateError 嵌套 asn1 错误

我有来自Apple的.p12文件,并尝试使用以下命令将其转换为.pem文件:opensslpkcs12-incert.p12-outapple_push_notification_development.pem-nodes-clcerts尝试创建新的OpenSSL::X509::Certificate对象时OpenSSL::X509::Certificate.new(File.read('apple_push_notification_development.pem'))我收到以下错误:OpenSSL::X509::CertificateError:nestedasn1errorfro